/* 
  数组的类型
    类型[]
    Array<类型>
*/
let arr: number[]
let arr1: Array<number>
// 推荐这种写法，即该数组中可以存放 number 或 string
let arr2: (number | string)[]
let arr3: Array<number | string>

/* 
  元组，元组就是固定长度的数组
      变量名: [类型,类型]
*/
let tupleArr: [string, number]
tupleArr = ["hellow", 100]

/* 
  enum 枚举
*/
enum List {
  Male = 0,
  Female = 1
}

let enumList: { name: string, gender: List }
enumList = {
  name: "孙悟空",
  gender: List.Male
}
console.log(enumList.gender === List.Male)